/*
This code was automatically generated using the Riverside-Irvine State machine Builder tool
Version 2 --- 1/22/2010 11:45:0 PST
*/

#include "rims.h"

/*Global C code is defined at global scope in generated code*/

unsigned char max=0x00;


enum res_States { res_A5_start, res_A5_ready, res_A5_pressed } res_State;

int main() {

   /*Local C code is located inside main() in generated code*/
 
   res_State = res_A5_start; // Initial state
   B = 0; // Init outputs

   while(1) {
      switch(res_State) { // State actions
         case res_A5_start:
            break;
         case res_A5_ready:
            break;
         case res_A5_pressed:
            break;
         default: // ADD default behaviour below
         break;
      } // State actions

      switch(res_State) { // Transitions
         case res_A5_start:
            if (A5==0) {
               res_State = res_A5_ready;
            }
            break;
         case res_A5_ready:
            if (A5==1) {
               res_State = res_A5_pressed;
            }
            break;
         case res_A5_pressed:
            if (A5==0) {
               res_State = res_A5_start;
               reset();
            }
            break;
         default:
            res_State = res_A5_start;
      } // Transitions
   } // while (1)
} // Main